<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.core.utils.*,com.hs.auth.model.*,com.hs.auth.*" pageEncoding="utf-8"%>
<%
   String pageStr = (String)request.getAttribute("pagestr");
   List datalist = (List)request.getAttribute("datalist");
   String pagenum = (String)request.getAttribute("pagenum");
   String pagecount = (String)request.getAttribute("pagecount");
   String allfullsql = (String)request.getAttribute("allfullsql");
    String totalcount = (String)request.getAttribute("totalcount");
   
	
   int pagenumInt = Integer.parseInt(pagenum==null?"0":pagenum);
   int pagecountInt = Integer.parseInt(pagecount==null?"0":pagecount);
   String orderName = (String)request.getAttribute("orderName");
   String orderNum = (String)request.getAttribute("orderNum");   
   String tags = (String)request.getAttribute("tags"); 
   String searchstrinfo = (String)request.getAttribute("searchstrinfo"); 
   String keyword = (String)request.getAttribute("keyword"); 
    
   
   
 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../../include.jsp"%> 
 <script language=JavaScript>
 
 //题录信息
 function magaInfo(id)
{
	var pageURL = "<%=basePath %>data/magainfo.do?id=" + id;
	openwindow(pageURL,'800','600',''); 
}
 
function exportResult(){
 	var checkObj =  document.all.checkmaga;
 	var magaid = "";
 	for(var i=0 ;i<checkObj.length; i++){
 		if(checkObj[i].checked){
 			magaid = magaid + checkObj[i].value + ",";
 		}
 	} 
 	if(magaid != ""){
 		var allsql = document.all.allsql.value;
 		document.exportform.action="<%=basePath%>search/exportMagaResult.do?magaid="+magaid+"&allsql="+ encodeURIComponent(allsql)+"&resulttype=1";	
  		document.exportform.submit();
 	}else{
 		alert("请选择要导出的数据!");
 	}
}
 
function exportAllResult(){
 	var allsql = document.all.allsql.value;
 	document.exportform.action="<%=basePath%>search/exportMagaResult.do?allsql="+ encodeURIComponent(allsql)+"&resulttype=2";	
  	document.exportform.submit();
 }
  
function exportData()
{
    var papers = getSelectPaper();
    if('' == papers){
    	alert('请选择要导出的文献!');
    	return;
    }
	document.dataform.action="<%=basePath%>search/exportAllData.do?ids="+papers;	
  	document.dataform.submit();
}
 
$(document).ready(function(){
	$("#tipcontain").jTipsShow({
		delaytime:200,
		tipsTag: 'span',
		tipsTitle: 'title'
	}); 
});
 function viewCaseDetail(caseid,paperid){
 	window.parent.document.location  ='<%=basePath%>search/casedetail.do?caseid='+caseid+'&paperid='+paperid;
 
 }
</script>
<style> 
 
.highlight { 
    background-color:#FF00FF; color:#FF0000;
} 

</style>
</head>
<body>
<!--上分页-->
<div class="page-wrap up">
   <div class="pull-left">找到 <strong><font color=red><%=totalcount %></font></strong>条记录 </div>
</div>
<!--/上分页-->
<!--检索结果-->
<ul class="list">
    <%if(datalist != null && datalist.size()>0) {
        for(int i =0;i<datalist.size();i++){
        	Map casedata = (Map)datalist.get(i);
        	String username = (String)casedata.get("huanzhexm");
        	String nianling = (String)casedata.get("nianling");
        	String zhenghou = (String)casedata.get("zhenghou");
        	String zhengzhuang = (String)casedata.get("zhengzhuang");
        	String zhongyijb = (String)casedata.get("zhongyijbmc");
        	String xiyijb = (String)casedata.get("xiyijbmc");
        	String yishengxm = (String)casedata.get("dname");
        	String author = (String)casedata.get("zuozhexm");
        	String wenti = (String)casedata.get("wenti"); 
        	String xuewei = (String)casedata.get("xuewei"); 
            String nianfen =  casedata.get("nian") + "";
            String qikanmc = (String)casedata.get("qikanmc");
            String xingbie = (String)casedata.get("xingbie");
            String caseid = casedata.get("id") +"";
            String paperid =  casedata.get("paperid")+"";
    %>
    <li>
        <a href="javaScript:viewCaseDetail('<%=caseid %>','<%=paperid%>');" class="pdf"><strong>患者：</strong><font color=#484891><%=username==null?"未知":username %>,<%=xingbie==null?"未知":xingbie %>,<%=nianling %>岁</font></a>
        <p>  
        <strong>证候：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(zhenghou),null,keyword)%> <br />
        <strong>症状：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(zhengzhuang),null,keyword) %><br />
        <strong>中医疾病：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(zhongyijb),null,keyword) %><br />
        <strong>西医疾病：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(xiyijb),null,keyword) %><br /> 
        <strong>穴位：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(xuewei),null,keyword) %><br /> 
        <strong>出处：</strong><%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(wenti),null,keyword) %>&nbsp;,<%=SystemUtil.higiLight(StringUtilTool.NULL2Blank(author),null,keyword) %>&nbsp;,<%=nianfen %>&nbsp;,<%=qikanmc %>&nbsp;<br/>
        
        </p>
        
    </li>
    <%}}else{ %>
     <li>
        
        <p>提示:<strong><font color=red>没有符合查询条件的结果，请更换查询条件重试!</font></strong>
         
    </li>
    <%} %> 
</ul>
<!--/检索结果-->
<!--下分页-->
<div class="page-wrap">
    <%=pageStr %>
</div>
<!--/下分页-->
</body>
</html>
